package com.yfp.org.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yfp.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单表(OrderList)实体类
 *
 *
 * @since 2023-12-28 16:07:28
 */
@Schema(title = "")
@Data
@Tag(name = "订单列表")
public class OrderListExcelVO implements Serializable {
    private static final long serialVersionUID = -12333129831839136L;
    /**
     * 订单编号
     */
    @Schema(title = "订单编号")
    @Excel(name = "订单编号", needMerge = true, sort = 1)
    private String orderSn;
    /**
     * id
     */
    @TableId
    @Schema(title = "id")
    private String id;
    /**
     * 订单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "订单时间")
    @Excel(name = "下单时间", needMerge = true, sort = 2,dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;
    /**
     * 订单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "订单时间")
    private Date orderEndTime;
    /**
     * 下单用户
     */
    @Schema(title = "下单用户")
    @Excel(name = "用户名称", needMerge = true, sort = 3)
    private String userName;
    /**
     * 用户联系方式
     */
    @Schema(title = "用户联系方式")
    @Excel(name = "手机号", needMerge = true, sort = 4)
    private String userMobile;

    /**
     * 数量
     */
    @Schema(title = "数量")
    private Long count;
    /**
     * 支付金额
     */
    @Schema(title = "支付金额")
    @Excel(name = "订单金额", needMerge = true, sort = 7, cellType = Excel.ColumnType.NUMERIC)
    private BigDecimal amt;
    /**
     * 退款单号
     */
    @Schema(title = "退款单号")
    private String refundSn;
    /**
     * 退款金额
     */
    @Schema(title = "退款金额")
    private String refundAmt;
    /**
     * 退款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "退款时间")
    private Date refundTime;
    /**
     * 退款原因
     */
    @Schema(title = "退款原因")
    private String refundReason;
    /**
     * 支付宝/微信交易号
     */
    @Schema(title = "支付宝/微信交易号")
    private String payTradeNo;
    /**
     * 支付方式（1：支付宝 2：微信）
     */
    @Schema(title = "支付方式（1：支付宝 2：微信）")
    @Excel(name = "支付方式", needMerge = true, sort = 8,readConverterExp = "1=支付宝,2=微信")
    private String payType;
    /**
     * 订单状态（1：未支付 2：已取餐 3：已完成 4：已退款 5：异常）
     */
    @Schema(title = "订单状态（1：未支付 2：已取餐 3：已完成 4：已退款 5：异常）")
    @Excel(name = "订单状态", needMerge = true, sort = 9,readConverterExp = "3=已完成,7=已取消,1=未支付,2=未取餐,4=已退款,6=退款中,9=退款失败,8=已付款")
    private Integer payStatus;

    private Integer normalPayStatus;
    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "支付时间")
    @Excel(name = "支付时间", needMerge = true, sort = 5,dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    /**
     * 套餐id
     */
    @Schema(title = "套餐id")
    private String comboId;
    /**
     * 套餐名称
     */
    @Schema(title = "套餐名称")
    @Excel(name = "餐品名称", needMerge = true, sort = 6)
    private String comboName;
    /**
     * 套餐标签
     */
    @Schema(title = "套餐标签")
    @Excel(name = "餐品标签", needMerge = true, sort = 10)
    private String comboTag;
    /**
     * 套餐标签
     */
    @Schema(title = "套餐")
    private String tagId;
    /**
     * 设备id
     */
    @Schema(title = "设备id")
    @Excel(name = "设备编号", needMerge = true, sort = 12)
    private String machineId;
    /**
     * 设备编号
     */
    @Schema(title = "设备编号")
    private String machineCode;
    /**
     * 设备名称
     */
    @Schema(title = "设备名称")
    @Excel(name = "设备名称", needMerge = true, sort = 13)
    private String machineName;
    /**
     * 货道号
     */
    @Schema(title = "货道号")
    private String machineRoadNo;
    /**
     * 公司id
     */
    @Schema(title = "公司id")
    private String companyId;

    /**
     * 公司名称
     */
    @Schema(title = "公司名称")
    private String companyName;
    /**
     * 区域id
     */
    @Schema(title = "区域id")
    private String areaId;
    /**
     * 区域名称
     */
    @Schema(title = "区域名称")
    private String areaName;
    /**
     * 线路id
     */
    @Schema(title = "线路id")
    private String routeId;
    /**
     * 线路名称
     */
    @Schema(title = "线路名称")
    private String routeName;
    /**
     * 点位id
     */
    @Schema(title = "点位id")
    private String positionId;
    /**
     * 点位名称
     */
    @Schema(title = "点位名称")
    @Excel(name = "点位名称", needMerge = true, sort = 14)
    private String positionName;
    /**
     * 设备地址
     */
    @Schema(title = "设备地址")
    private String positionAddr;
    /**
     * 取餐码
     */
    @Schema(title = "取餐码")
    private String checkCode;
    /**
     * 订单备注
     */
    @Schema(title = "订单备注")
    private String remark;
    /**
     * 异常原因
     */
    @Schema(title = "异常原因")
    private String exceptionReason;
    /**
     * 标记异常时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")

    @Schema(title = "标记异常时间")
    private Date exceptionTime;
    /**
     * 异常标记操作人
     */
    @Schema(title = "异常标记操作人")
    private String exceptionOper;
    /**
     * 异常标记操作人
     */
    @Schema(title = "是否异常")
    private String isExceptionOper;
    /**
     * 异常标记操作人
     */
    @Schema(title = "类型")
    private String type;
    /**
     * 订单类型（0小程序，1设备）
     */
    @Schema(title = "订单类型（0小程序，1设备）")
    @Excel(name = "订单类型", needMerge = true, sort = 11,readConverterExp = "0=小程序,1=设备,2=企业")
    private String orderType;

    private Integer noPayStatus;

    private String typeName;

    @Schema(title = "餐品类别")
    @Excel(name = "餐品类别", needMerge = true, sort = 10)
    private String tagName;

    private String updateName;
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")

    private Date updateTime;
    private String tablewareUrl;
    private String pageNum;
    private String pageSize;
    private String orderEntTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(title = "退款申请时间")
    private Date refundForTime;

    /**
     * 公司id列表
     */
    @TableField(exist = false)
    private List<String> companyIds;

}
